Bug #592461.
G_FILE_ERROR,
g_file_error_from_errno (save_errno),
_("Failure reading GIF: %s"),
- strerror (save_errno));
+ g_strerror (save_errno));
}
#ifdef IO_GIFDEBUG
if (g_mkdir (sys_full_path, 0777) < 0)
{
+ int errsv = errno;
+
buf = g_strdup_printf (_("Error creating folder '%s': %s"),
- dirname, g_strerror (errno));
+ dirname, g_strerror (errsv));
gtk_file_selection_fileop_error (fs, buf);
}
if (g_unlink (sys_full_path) < 0)
{
+ int errsv = errno;
+
buf = g_strdup_printf (_("Error deleting file '%s': %s"),
- fs->fileop_file, g_strerror (errno));
+ fs->fileop_file, g_strerror (errsv));
gtk_file_selection_fileop_error (fs, buf);
}
if (g_rename (sys_old_filename, sys_new_filename) < 0)
{
+ int errsv = errno;
+
buf = g_strdup_printf (_("Error renaming file \"%s\" to \"%s\": %s"),
sys_old_filename, sys_new_filename,
- g_strerror (errno));
+ g_strerror (errsv));
gtk_file_selection_fileop_error (fs, buf);
goto out2;
}
if (kill ((pid_t) pid, SIGTERM) != 0)
{
+ int errsv = errno;
+
/* TODO: On EPERM, we could use a setuid helper using polkit (very easy to implement
* via pkexec(1)) to allow the user to e.g. authenticate to gain the authorization
* to kill the process. But that's not how things currently work.
ret = FALSE;
g_set_error (error,
G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Cannot end process with pid %d: %s"),
pid,
- strerror (errno));
+ g_strerror (errsv));
}
return ret;
g_unlink (bak_cache_path);
if (g_rename (cache_path, bak_cache_path) == -1)
{
+ int errsv = errno;
+
g_printerr (_("Could not rename %s to %s: %s, removing %s then.\n"),
cache_path, bak_cache_path,
- g_strerror (errno),
+ g_strerror (errsv),
cache_path);
g_unlink (cache_path);
bak_cache_path = NULL;
if (g_rename (tmp_cache_path, cache_path) == -1)
{
+ int errsv = errno;
+
g_printerr (_("Could not rename %s to %s: %s\n"),
tmp_cache_path, cache_path,
- g_strerror (errno));
+ g_strerror (errsv));
g_unlink (tmp_cache_path);
#ifdef G_OS_WIN32
if (bak_cache_path != NULL)
if (g_rename (bak_cache_path, cache_path) == -1)
- g_printerr (_("Could not rename %s back to %s: %s.\n"),
- bak_cache_path, cache_path,
- g_strerror (errno));
+ {
+ errsv = errno;
+
+ g_printerr (_("Could not rename %s back to %s: %s.\n"),
+ bak_cache_path, cache_path,
+ g_strerror (errsv));
+ }
#endif
exit (1);
}